package com.dmjj.cad.service.impl;

import com.dmjj.cad.dao.SubgraphMapper;
import com.dmjj.cad.dto.SubgraphDTO;
import com.dmjj.cad.service.SubgraphService;
import com.dmjj.cadcommon.base.BaseMapper;
import com.dmjj.cadcommon.base.BaseServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import java.util.List;


/**
 * 元素子表业务处理接口
 * @Author zhangxue
 * @Date 2019-04-29 15:17:18
 */
@Service
public class SubgraphServiceImpl extends BaseServiceImpl<SubgraphDTO, Long> implements SubgraphService {

    private static final Log LOGGER = LogFactory.getLog(SubgraphServiceImpl.class);

    @Autowired
    private SubgraphMapper mapper;

    @Override
    protected BaseMapper<SubgraphDTO, Long> getMapper() {
        return mapper;
    }

    /**
     * 元素子表列表
     * @Author zhangxue
     * @Date 2019-04-29 15:17:18
     * @Param
     * @Return
     */
    @Override
    public List<SubgraphDTO> list4Page(SubgraphDTO entity, Integer pageNum, Integer... pageSize) {
        return super.list4Page(entity, pageNum, pageSize);
    }

    /**
     * 元素子表列表（无分页）
     * @Author zhangxue
     * @Date 2019-04-29 15:17:18
     * @Param
     * @Return
     */
    @Override
    public List<SubgraphDTO> listByCondition(SubgraphDTO entity) {
        return super.listByCondition(entity);
    }

    /**
     * 查询元素子表详情信息
     * @Author zhangxue
     * @Date 2019-04-29 15:17:18
     * @Param
     * @Return
     */
    @Override
    public SubgraphDTO queryOneByPk(Long id) {
        return super.queryOneByPk(id);
    }

    /**
     * 保存元素子表信息
     * @Author zhangxue
     * @Date 2019-04-29 15:17:18
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Long save(SubgraphDTO entity) {
        return super.save(entity);
    }

    /**
     * 删除元素子表信息
     * @Author zhangxue
     * @Date 2019-04-29 15:17:18
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Integer delete(Long id) {
        return super.delete(id);
    }

    @Override
    public List<SubgraphDTO> byGraphId(Long graphId) {
        return mapper.byGraphId(graphId);
    }
}
